package cn.cy.behavior.observer.inter.pattern;

/**
 * @author yangxq
 * @desc
 * @date 2025-05-11
 */
public class PatternClient {

    public static void main(String[] args) {
        Stock stock = new Stock("Apple Ltd", 150.00);
        StockDisplay display = new StockDisplay(stock);
        stock.setPrice(155.00); // 通知所有观察者更新

        Fund fund = new Fund("Mixed Fund", 1.23);
        FundDisplay fundDisplay = new FundDisplay(fund);
        fund.setPrice(1.24);
    }

}
